package cn.shujuhai.common.service;

import cn.shujuhai.common.domain.Department;
import cn.shujuhai.common.pluging.data.ResultVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;

import java.util.List;
import java.util.Map;

/**
 * @author 4g0
 * @description 针对表【department】的数据库操作Service
 * @createDate 2025-06-12 09:37:37
 */
public interface DepartmentService extends IService<Department> {

    ResultVo<?> getDepartmentsWithParentsByNameLike(String departmentName);

    ResultVo<Department> removeId(Integer departmentId);

    ResultVo<?> saveDepartment(Department department);

    ResultVo<Department> updateDepartment(Department department);

    ResultVo<?> getDepartmentByUserId();

    ResultVo<?> getDepartmentByDepartmentId(Long departmentId);

    ResultVo<?> departmentIdsByUserId(Long userId);

    ResultVo<?> sessionDepartmentId(Map<String, Long> request, HttpServletRequest httpRequest);

    ResultVo<?> getSessionDepartmentId(HttpServletRequest request);
//    ResultVo<PageInfo<Department>> getDepartmentList(@NotNull(message = "当前页码不能为空") @Min(value = 1, message = "当前页码必须大于等于1") @Max(value = Integer.MAX_VALUE, message = "当前页码不能超过整型范围") Integer pageNum, @NotNull(message = "每页显示条数不能为空") @Min(value = 1, message = "每页显示条数必须大于等于1") @Max(value = Integer.MAX_VALUE, message = "每页显示条数不能超过整型范围") Integer pageSize);
}
